import { request } from "@/request";

export async function fetchList(data) {
  const res = await request("/admin/dishOrder/pageQuery", {
    method: "POST",
    data,
  });
  return {
    data: res?.data?.list,
    total: res?.data?.total,
    success: true,
  };
}

export async function fetchOrderSubList(data) {
  const res = await request("/admin/dishOrderSub/pageQuery", {
    method: "POST",
    data,
  });
  return {
    data: res?.data?.list,
    total: res?.data?.total,
    success: true,
  };
}

export async function fetchAreaStatistics(data) {
  return request("/admin/dishOrder/areaStatistics", {
    method: "POST",
    data,
  });
}
